/*
 * @Author: zhang_gen_yuan
 * @Date: 2021-08-14 18:06:10
 * @LastEditTime: 2021-08-17 09:21:27
 * @Descripttion: 
 */
import Layout from "/@/layout/index.vue";

const asyncRoutes = [
  {
    path: "/",
    name: "Dashboard",
    component: Layout,
    redirect: "/dashboard",
    children: [
      {
        path: "dashboard",
        name: "Dashboard",
        component: () => import("/@/views/dashboard/index.vue"),
        meta: {
          title: '首页',
          icon: "dashboard",
          noCache: true,
          roles: ['admin'],
        },
      },
    ],
  },
  {
    path:'/price',
    component:Layout,
    meta:{
      title:'赞助',
      icon:'price',
      noCache: true,
      roles: ['admin'],
    },
    children:[
      {
        path:'price',
        name:'Price',
        component: () => import("/@/views/price/index.vue"),
        meta: {
          title: '点击赞助',
          icon: "banner",
          noCache: true,
          // roles : ['admin'],
        },
      }
    ]
  },
  {
    path: "/demo",
    name: "Demo",
    component: Layout,
    redirect: "/demo/editor",
    meta: {
      title: 'DEMO',
      icon: "component",
      noCache: true,
      roles: ['admin'],
    },
    children: [
      {
        path: "editor",
        name: "Editor",
        component: () => import("/@/views/demo/editor/index.vue"),
        meta: {
          title: '富文本编辑器',
          icon: "banner",
          noCache: true,
          // roles : ['admin'],
        },
      },
      {
        path: "/fabric",
        name: "Fabric",
        component: () => import("/@/views/demo/canvas/index.vue"),
        meta: {
          title: '德玛西亚',
          icon: "office",
          noCache: true,
          roles: ['admin'],
        },
      },
    ]
  },

  { path: '/:pathMatch(.*)', redirect: '/404', hidden: true }
]


export default asyncRoutes;